Connectivity Software User's Guide and Reference
FilteredBy(Predicate<UARolePermissions>) Method



OpcLabs.EasyOpcUAPrimitives Assembly > OpcLabs.EasyOpc.UA.Security.Subject Namespace > UAPermissionAssignment Class > FilteredBy Method : FilteredBy(Predicate<UARolePermissions>) Method
The predicate to filter role permissions. It is a function that takes a OpcLabs.EasyOpc.UA.UARolePermissions object as input and returns a boolean indicating whether the object should be included in the filtered result.

The value of this parameter cannot be null (Nothing in Visual Basic).

Returns a filtered permission assignment based on the specified predicate.
Syntax
'Declaration
 
<JetBrains.Annotations.NotNullAttribute()>
Public Overloads Function FilteredBy( _
   ByVal predicate As Predicate(Of UARolePermissions) _
) As UAPermissionAssignment
'Usage
 
Dim instance As UAPermissionAssignment
Dim predicate As Predicate(Of UARolePermissions)
Dim value As UAPermissionAssignment
 
value = instance.FilteredBy(predicate)
[JetBrains.Annotations.NotNull()]
public UAPermissionAssignment FilteredBy( 
   Predicate<UARolePermissions> predicate
)
[JetBrains.Annotations.NotNull()]
public:
UAPermissionAssignment^ FilteredBy( 
   Predicate<UARolePermissions^>^ predicate
) 

Parameters

predicate
The predicate to filter role permissions. It is a function that takes a OpcLabs.EasyOpc.UA.UARolePermissions object as input and returns a boolean indicating whether the object should be included in the filtered result.

The value of this parameter cannot be null (Nothing in Visual Basic).

Return Value

A new UAPermissionAssignment instance containing only the role permissions that match the specified predicate.

This method never returns null (Nothing in Visual Basic).

Exceptions
ExceptionDescription

A null reference (Nothing in Visual Basic) is passed to a method that does not accept it as a valid argument.

This is a usage error, i.e. it will never occur (the exception will not be thrown) in a correctly written program. Your code should not catch this exception.

Remarks

This method iterates through all role permissions in the current collection and applies the given predicate to each of them. Only the role permissions that satisfy the predicate are included in the resulting permission assignment.

Requirements

Target Platforms: .NET Framework: Windows 10 (selected versions), Windows 11 (selected versions), Windows Server 2016, Windows Server 2022; .NET: Linux, macOS, Microsoft Windows

See Also